﻿<%@page language="java" pageEncoding="UTF-8"%>
<%@taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
<html>
	<head>
		<TITLE>链接列表</TITLE>
		<jsp:include page="../cssjsInList.jsp" flush="true"/>
	</head>
	<body>
		<div id="content">
			<TABLE class=border cellSpacing=1 cellPadding=2 width="100%" align=center border=0>
				<TBODY>
					<TR class=topbg>
						<TD align=middle colSpan=2 height=22>
							<STRONG>常用链接和相关链接管理</STRONG>
						</TD>
					</TR>
					<TR class=topbg>
						<TD>
							<STRONG> 
								<a href="<%=request.getContextPath()%>/hotlinkManage.do?method=hotlinklist">链接管理首页</a>
								[ <a href="<%=request.getContextPath()%>/hotlinkManage.do?method=hotlinkadd">添加链接</a> ]
							</STRONG>
						</TD>
					</TR>
					<TR class=topbg>
						<TD>
							<br>
							<form name=form action="<%=request.getContextPath()%>/hotlinkManage.do?method=hotlinklist" method=post>
								<TABLE class=border cellSpacing=1 cellPadding=2 width="100%"
									align=center border=0>
									<TR class=tdbg>
										<TD>
											<INPUT onclick=submit(); type=radio  id="all" value=all CHECKED
												name=radiooption <c:if test="${radiooption=='all'}" > checked</c:if>>
											ALL&nbsp;&nbsp;&nbsp;
											<INPUT onclick=submit(); type=radio id="h" value=h name=radiooption <c:if test="${radiooption=='h'}" > checked</c:if>>
											常用链接&nbsp;&nbsp;&nbsp;
											<INPUT onclick=submit(); type=radio id="r" value=r name=radiooption <c:if test="${radiooption=='r'}" > checked</c:if>>
											相关链接&nbsp;&nbsp;&nbsp;&nbsp;
										</TD>
									</TR>
								</TABLE>
							</form>
						</TD>
					</TR>
				</TBODY>
			</TABLE>
			<table border="0" width="100%" align="center">
				<!-- 一级table 提供“搜索功能” -->
				<tr>
					<td align="center">
						<form action="<%=request.getContextPath()%>/hotlinkManage.do?method=hotlinklist" method="post">
							<SELECT size=1 name=keywordType>
								<OPTION value=url selected>
									链接地址
								</OPTION>
								<OPTION value=title selected>
									链接名称
								</OPTION>
							</SELECT>
							<input name="keyword" type="text" size="40" maxlength="40" />
							<input name="button" type="submit" value="查找" />
						</form>
					</td>
				</tr>
			</table>
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="data">
				<tr>
					<th align="center" nowrap="nowrap">
						<div align="center">
							ID
						</div>
					</th>
					<th width="21%" align="center" nowrap="nowrap">
						名称
					</th>
					<th width="50%" align="center" nowrap="nowrap">
						链接
					</th>
					<th width="6%" align="center" nowrap="nowrap">
						类型
					</th>
					<th width="6%" align="center" nowrap="nowrap">
						排序值
					</th>
					<th width="11%" align="center" nowrap="nowrap">
						操作
					</th>
				</tr>
				<c:forEach items="${hotlinklist}" var="hotlink">
					<c:if test="${hotlink.id%2==1}">
						<c:set var="rowtype" value="odd" />
					</c:if>
					<c:if test="${hotlink.id%2==0}">
						<c:set var="rowtype" value="even" />
					</c:if>
					<tr class="${rowtype}" onMouseOver="this.className = 'row_over';"
						onMouseOut="this.className = '${rowtype}';">
						<td width="6%" align="center" nowrap="nowrap">
							${hotlink.id}
						</td>
						<td colspan="1" align="left" nowrap="nowrap">
							${hotlink.title}
						</td>
						<td align="right" nowrap="nowrap">
							<div align="center">
								${hotlink.url}
							</div>
						</td>
						<td align="center" nowrap="nowrap">
							<font color="red">
								${hotlink.typeString}
							</font>
						</td>
						<td colspan="1" align="left" nowrap="nowrap">
							${hotlink.sortNumber}
						</td>
						<td align="center" nowrap="nowrap">
							<a href="<%=request.getContextPath()%>/hotlinkManage.do?method=hotlinkedit&hotlinkid=${hotlink.id}">编辑</a>
							|
							<a href="<%=request.getContextPath()%>/hotlinkManage.do?method=hotlinkdel&hotlinkid=${hotlink.id}"
								onClick="return confirm('您确定要删除 ${hotlink.title} ？');">删除</a>
						</td>
					</tr>
				</c:forEach>
				<tr>
					<td colspan="15" align="center" bgcolor="#FCFCFC">
						<jsp:include page="../page.jsp" flush="true"/>
					</td>
				</tr>
			</table>
		</div>
	</body>
</html>
